package com.lz.timer.an.common;

import com.lz.common.util.GetCfg;

/**
 * @author rench
 * @Description: 配置
 */
public class Config {

    public static final String PROJECT_NAME = "lzmh_dsp_timer";

    /**
     * zk配置节点路径
     **/
    public static final String ZK_CONFIG_PATH = GetCfg.getString("Zk_Config_path", "/config/" + PROJECT_NAME);
    /**
     * zk服务注册节点路径
     **/
    public static final String ZK_SERVER_PATH = GetCfg.getString("Zk_Server_path",
            "/server/" + PROJECT_NAME + "/" + PROJECT_NAME);

    // 虚拟值

    // job

    /**
     * job默认的cron
     **/
    public static String JOB_DEF_CRON;

    /**
     * 统计时间过长预警(s)
     */
    public static int COUNT_TIME_WARN;

    /**
     * 配置初始化
     */
    public static void init() {

        // === job ===
        // 默认每天23:30
        JOB_DEF_CRON = GetCfg.getString("Job_Def_Cron", "0 30 23 * * ? *");

        /** 统计时间过长预警(s) */
        COUNT_TIME_WARN = GetCfg.getInt("Count_Time_Warn", 100000);
    }

}
